package cn.tedu.yxcar.product.controller;

import cn.tedu.yxcar.product.mapper.ArticleListItemMapper;
import cn.tedu.yxcar.product.pojo.vo.ArticleListItemVO;
import cn.tedu.yxcar.product.web.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/article/listItem")
public class ArticleListItemController {
    @Autowired
    private ArticleListItemMapper articleListItemMapper;

    @GetMapping("/select")
    public JsonResult selectAll(){
        List<ArticleListItemVO> list = articleListItemMapper.list();
        return JsonResult.ok(list);
    }
}
